<script setup lang="ts">
import {DisplayTable} from "@/components/MyComponent/DisplayTable/displayInterface";
import {UserQueryVo, UserVo} from "@/api/sys/admin/user/types";
import {getUserListApi} from "@/api/sys/admin/user";

const props = defineProps<{ roleId: number }>()
const options: DisplayTable<UserQueryVo, UserVo> = {
  api: {
    getList: getUserListApi
  },
  attrs: [
    {
      prop: 'username',
      label: '用户名'
    },
    {
      prop: 'nickname',
      label: '昵称'
    },
    {
      prop: 'status',
      label: '状态',
      formType: 'radio',
      code: 'status',
      query:false
    },
  ],
  initQuery: {
    query: {
      roleId: props.roleId
    }
  },
  card:true,
  title:'当前角色下的用户'
}
</script>

<template>
  <x-display-table :options="options"/>
</template>
